<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<link href="css/common.css" rel="stylesheet" type="text/css"/>
<link href="css/photo.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/YY_dialog.js"></script>
<script type="text/javascript" src="js/common.js"></script>
    <script src="js/fileuploader.js" type="text/javascript"></script>
    <script>
        function createUploader(){            
            var uploader = new qq.FileUploader({
                element: document.getElementById('file_upload'),
                action: 'save_file.php',
                debug: true,
                uploadButtonText: '上传',
                cancelButtonText: '取消',
                failUploadText: '失败',
                extraDropzones: [qq.getByClass(document, 'qq-upload-extra-drop-area')[0]],
                onSubmit: function(id, fileName){
                	uploader.setParams({
                		catalog_id: $('select[name="catalog_id"]').val()
             	    });
                },
                onComplete: function(id, fileName, responseJSON){
                    
				},
                params: {
                    catalog_id: false
                }
            });
        }
        
        // in your app create uploader as soon as the DOM is ready
        // don't wait for the window to load  
        window.onload = createUploader;     
    </script>
</head>
<body class="inner_page">
<div class="catalog_ctn">
请选择分类：<select name="catalog_id"> 
<?php 
require_once('include/class.php');
$data=new data();
$a=$data->preview(array('id','catalog_name'),'catalog',null,null,"father_id=18");
While ($des_row = $a->fetch_assoc ())
	echo '<option value="'.$des_row['id'].'">'.$des_row['catalog_name'].'</option>';
?>
</select><a class="add_catalog">Add</a>
</div>
	<div id="file_upload">		
		<noscript>			
			<p>Please enable JavaScript to use file uploader.</p>
			<!-- or put a simple form for upload here -->
		</noscript>         
	</div>

	<div class="qq-upload-extra-drop-area">Drop files here too</div>

<!--  img src="dl.php?id=1"/-->
<ul>

</ul>
<script type="text/javascript">
$('.add_catalog').click(function(){
	show_info('请输入分类名称：<input size="5"/><br/><button>确定</button>');
});
</script>
</body>

</html>